home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Advisor / CD-ROM Advisor.iso / prodemo / demo / pdymain.dxr / 00004.ls < prev    next >
Encoding:
Text File  |  1995-09-29  |  2.0 KB  |  62 lines

  1. on enterFrame
  2.   global gMovieToPlay, gIndexOfCurrentButton, gMouseDownInButton, gIsMainButton, gIsSmallButton, gChannelForHighLights, gChannelForFreeFlash, gFreeFlashTimerBase, gSmallButtonsOn, gCursorIsHand
  3.   set gCursorIsHand to 0
  4.   set hTemp to the mouseH
  5.   set vTemp to the mouseV
  6.   if gMouseDownInButton then
  7.     if gIsMainButton then
  8.       set iButtonTemp to isPositionWithinMainButton(hTemp, vTemp)
  9.       if iButtonTemp = gIndexOfCurrentButton then
  10.         set the visible of sprite gChannelForHighLights to 1
  11.         updateStage()
  12.       else
  13.         set the visible of sprite gChannelForHighLights to 0
  14.         updateStage()
  15.       end if
  16.     else
  17.       if gSmallButtonsOn then
  18.         set iButtonTemp to isPositionWithinSmallButton(hTemp, vTemp)
  19.         if iButtonTemp = gIndexOfCurrentButton then
  20.           set the visible of sprite gChannelForHighLights to 1
  21.           updateStage()
  22.         else
  23.           set the visible of sprite gChannelForHighLights to 0
  24.           updateStage()
  25.         end if
  26.       end if
  27.     end if
  28.   else
  29.     if (isPositionWithinMainButton(hTemp, vTemp) > 0) or (isPositionWithinSmallButton(hTemp, vTemp) > 0) then
  30.       if not gCursorIsHand then
  31.         cursor([9, 10])
  32.         set gCursorIsHand to 1
  33.       end if
  34.     else
  35.       cursor(-1)
  36.       set gCursorIsHand to 0
  37.     end if
  38.   end if
  39.   if gSmallButtonsOn then
  40.     put "gSmallButtonsOn =", gSmallButtonsOn
  41.     set timeDeltaTemp to the timer - gFreeFlashTimerBase
  42.     if (timeDeltaTemp > 100) and (timeDeltaTemp <= 150) then
  43.       set the visible of sprite gChannelForFreeFlash to 1
  44.     else
  45.       if timeDeltaTemp > 150 then
  46.         set the visible of sprite gChannelForFreeFlash to 0
  47.         set gFreeFlashTimerBase to the timer
  48.       end if
  49.     end if
  50.   end if
  51. end
  52.  
  53. on exitFrame
  54.   global gNextLabel, gIsMainButton, gIsSmallButton, gAnisForMainButtons, gIndexOfCurrentButton, gMovieToPlay, gCursorIsHand
  55.   if gMovieToPlay then
  56.     cursor(4)
  57.     set gCursorIsHand to 0
  58.     play movie getAt(gAnisForMainButtons, gIndexOfCurrentButton)
  59.   end if
  60.   go(gNextLabel)
  61. end
  62.